package org.nlp2rdf.navigator.component;

public class ComponentConfig implements IComponentConfig {

	private String pathModifier;
	private String id;

	public String getPathModifier() {
		return getRootPath() + pathModifier;
	}

	public void setPathModifier(String pathModifier) {
		this.pathModifier = pathModifier;
	}

	/**
	 * gets the Calania.home path or root when developing
	 * 
	 * @return
	 */
	public static String getRootPath() {
		String catalinahome = System.getProperty("catalina.home");
		if (catalinahome == null) {
			return "";
		} else {
			return catalinahome + ((catalinahome.endsWith("/")) ? "" : "/");
		}
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

}
